﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
namespace LitTools
{
    /// <summary>
    /// PlayerPref存档工具
    /// </summary>
    public class PlayerPrefSaveTools
    {
        [MenuItem("LitTools/LitSave/PlayerPref/ClearAllData")]
        public static void ClearAllData()
        {
            var keyList = CSUtility.GetSubclasses(typeof(SaveData<>));
            //PlayerPrefs.DeleteKey();
        }

        [MenuItem("LitTools/LitSave/PlayerPref/ClearAllData")]
        public static void DebugData()
        {
            //string data = PlayerPrefs.GetString(PlayerPrefSave.SaveKey, "");
            //if (string.IsNullOrEmpty(data))
            //{
            //    Debug.Log($"[PlayerPrefSaveTools] DebugData data is null");
            //    return;
            //}
            //data = EncryptAndDecryptByAES.DecryptString(data, StorageModule.EncryptKey, StorageModule.EncryptIV);
            //Debug.Log($"[PlayerPrefSaveTools] DebugData:\n {data}");
        }
    }
}
